/**
 * TimelinePropertyCommand
 */

  function TimelinePropertyCommand (dataProvider, oldTimeline, newTimeline) {
      this.dataProvider = dataProvider;
      this.oldTimeline = oldTimeline;
      this.newTimeline = newTimeline;
      this.timelineId = this.oldTimeline.id;
  };
  TimelinePropertyCommand.prototype = {
      execute: function() {

      },
      undo: function() {
          // 执行撤销操作
          var timelineModel = this.dataProvider.getTimelineById(this.timelineId);
          angular.extend(timelineModel, this.oldTimeline);
          timelineModel.history = true;
          timelineModel.property_changed = new Date();
      },
      redo: function() {
          // 执行重做操作
          var timelineModel = this.dataProvider.getTimelineById(this.timelineId);
          angular.extend(timelineModel, this.newTimeline);
          timelineModel.history = true;
          timelineModel.property_changed = new Date();
      }
  };

  module.exports = TimelinePropertyCommand;
